package com.cf;

import com.hzzc.Result;
import com.hzzc.api.AuthorityBean;
import com.hzzc.api.SSOApplicationUserAuthorityView;
import com.hzzc.sso.sdk.RemoteUserAuthorityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SSOTest implements CommandLineRunner {

    @Autowired
    private RemoteUserAuthorityService remoteUserAuthorityService;

    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(SSOTest.class);
        springApplication.run(args);
    }

    @Override
    public void run(String... args) throws Exception {
        Result<SSOApplicationUserAuthorityView> dz = remoteUserAuthorityService.getUserApplicationUserAuthorityView(new AuthorityBean().setCode("7c43f351-475b-49ff-9b42-5ddd60f0ac7b").setApp("dz"));
        System.out.println(dz);
    }

}
